#pragma once

#include "PLObject.h"
#include "PLEnums.h"

#include <string>

class PLMosaic;

/**
  *	A PLImageFactory object is used to generate the images corresponding to a
  * particular PLMosaic objects. Those images are the leveled textures and all
  * the types of masks.
  */
class PLImageFactory : public PLObject
{
public:
	PLImageFactory( const PLMosaic *mosaic );

	bool GenerateLevelledTextures( const std::string &path, const PLImageFormat &imageFormat = PL_IMAGEFORMAT_JPEG );
	bool GenerateLevellingFunctionTextures( const std::string &path, const PLImageFormat &imageFormat = PL_IMAGEFORMAT_JPEG );
	bool GenerateLevellingFunctionValueTextures( const std::string &path, const PLChannel &channel, const PLImageFormat &imageFormat = PL_IMAGEFORMAT_JPEG );

	bool GenerateAreaMasks( const std::string &path, const PLImageFormat &imageFormat = PL_IMAGEFORMAT_JPEG );
	bool GenerateMeshStructureMasks( const std::string &path, bool withOutlineTriangleRing = true, const PLImageFormat &imageFormat = PL_IMAGEFORMAT_JPEG );
	bool GenerateOutlineMasks( const std::string &path, const PLImageFormat &imageFormat = PL_IMAGEFORMAT_JPEG );
	
private:
	/** Const pointer to the PLMosaic object the images are generated for */
	const PLMosaic *mMosaic;
};